import React from 'react';
import LinkTo from '@/components/LinkTo';
import styles from './style.less';

const CompanyDesc = ({ data, selected, reportType }) => {
    const company = data.find(item => item.id === selected) || {};
    const query = {
        companyId: company.id,
        reportType,
        evalFlag: 1
    };
    return (
        <div className={styles.descBox}>
            <div className={styles.desc}>
                总员工/考核员工：
                <LinkTo to="/stat/workStat/workOverview/work/employee" query={query}>
                    {company.totalPeopleNum || '--'} / {company.evalPeopleNum || '--'}
                </LinkTo>
            </div>
            <LinkTo to="/stat/workStat/workOverview/work/overview" query={query}>
                查看公司工作透视
            </LinkTo>
        </div>
    );
};

export default CompanyDesc;
